﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe Name="NewCustomProvider" xmlns="http://schemas.microsoft.com/pag/gax-core" xmlns:xi="http://www.w3.org/2001/XInclude" Bound="false">
  <DocumentationLinks>
    <Link Kind="Documentation" Caption="Creating Providers" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.EntLib.2007Apr/EnterpriseLibrary/html/10-060-Creating_Providers.htm" />
    <Link Kind="Documentation" Caption="How To: Create an Untyped Provider" Url="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.EntLib.2007Apr/EnterpriseLibrary/html/10-090-How_To_Create_an_Untyped_Provider.htm" />    
    <Link Kind="NextStep" Caption="Convert Untyped Provider to Typed Provider" Url="recipe://ConvertCustomProvider" />
  </DocumentationLinks>
  <xi:include href="../Common/CommonTypeAliases.xml"
				xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Types)" />
  <Caption>New Provider (Untyped)</Caption>
  <Description>Creates an untyped (custom) provider that can extend custom application blocks.</Description>
  <HostData>
    <CommandBar Menu="EnterpriseLibraryProjectMenu"/>
		<CommandBar Menu="EnterpriseLibraryFolder"/>
	</HostData>
  <Arguments>
    <xi:include href="../Common/CommonProvider.xml"
        xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(gax:Recipe/gax:Arguments/gax:Argument)" />
    <Argument Name="RuntimeProviderBaseType" Type="System.Type">
		</Argument>
    <Argument Name="RuntimeProviderBaseTypeFullName">
			<ValueProvider Type="ArgumentExpressionProvider" Expression="$RuntimeProviderBaseType.FullName$">
				<MonitorArgument Name="RuntimeProviderBaseType" />
			</ValueProvider>
		</Argument>
		<Argument Name="ConfigurationNamespace">
			<ValueProvider Type="ArgumentExpressionProvider" Expression="$Namespace$.Configuration">
				<MonitorArgument Name="Namespace" />
			</ValueProvider>
		</Argument>
		<Argument Name="RuntimeConfigurationBaseType" Type="System.Type">
			<ValueProvider	Type="Microsoft.Practices.EnterpriseLibrary.BlockFactory.ValueProviders.Providers.ProviderCustomConfigurationClassValueProvider, Microsoft.Practices.EnterpriseLibrary.BlockFactory" 
									BaseType="RuntimeProviderBaseType" 
									ConfigurtionNamespace="ConfigurationNamespace"
											>
				<MonitorArgument Name="RuntimeProviderBaseType" />
			</ValueProvider>
		</Argument>
    <Argument Name="RuntimeConfigurationBaseTypeFullName">
			<ValueProvider Type="ArgumentExpressionProvider" Expression="$RuntimeConfigurationBaseType.FullName$">
				<MonitorArgument Name="RuntimeConfigurationBaseType" />
			</ValueProvider>
		</Argument>
		<Argument Name="EnterpriseLibraryReferences" Required="false" >
			<ValueProvider Type="Evaluator" Expression="Microsoft.Practices.EnterpriseLibrary.Common.dll,Microsoft.Practices.ObjectBuilder.dll" />
		</Argument>
	</Arguments>
	<GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
      <Pages>
        <Page>
          <Title>New Provider (Untyped)</Title>
          <LinkTitle>New Provider (Untyped)</LinkTitle>
					<Help></Help>
					<Fields>
            <Field  ValueName="ProviderName" Label="Name" >
              <Tooltip>Specifies the name for the new custom Provider</Tooltip>
            </Field>
            <Field ValueName="RuntimeProviderBaseType" Label="Provider Base Class">
              <Tooltip>Specifies the base type for the new custom provider</Tooltip>
							<Editor Type="Microsoft.Practices.EnterpriseLibrary.BlockFactory.Editors.TypeBrowser, Microsoft.Practices.EnterpriseLibrary.BlockFactory" 
											Filter="Microsoft.Practices.EnterpriseLibrary.BlockFactory.Editors.PublicTypeFilter, Microsoft.Practices.EnterpriseLibrary.BlockFactory" />
						</Field>
            <Field ValueName="RuntimeConfigurationBaseType" Label="Configuration Base Class">
              <Tooltip>Specifies the custom configuration class for the new custom provider</Tooltip>
							<Editor Type="Microsoft.Practices.EnterpriseLibrary.BlockFactory.Editors.TypeBrowser, Microsoft.Practices.EnterpriseLibrary.BlockFactory" 
											Filter="Microsoft.Practices.EnterpriseLibrary.BlockFactory.Editors.PublicTypeFilter, Microsoft.Practices.EnterpriseLibrary.BlockFactory" />
						</Field>
          </Fields>
        </Page>
      </Pages>
    </Wizard>
  </GatheringServiceData>
  <Actions>
    <Action   Name="CreateProviderInfo" 
          Type="CreateProviderInfo"
          RuntimeProviderRootType=""
          DefaultRuntimeImplementationTemplate="$TextTemplateBaseDirectory$DefaultImplementations\Provider.t4">
      <Input Name="RuntimeProviderBaseType" RecipeArgument="RuntimeProviderBaseTypeFullName" />
      <Input Name="ConfigurationClassName" RecipeArgument="RuntimeConfigurationBaseTypeFullName" />
      <Input Name="Namespace" RecipeArgument="Namespace" />
			<Input Name="ExtendedNamespace" RecipeArgument="ExtendedNamespace" />
			<Input Name="ProviderName" RecipeArgument="ProviderName" />
      <Output Name="ProviderInfo" />
      <Output Name="DefaultRuntimeImplementationTemplate" />
    </Action>
    <xi:include href="../Common/CommonCustomProvider.xml"
      xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(gax:Recipe/gax:Actions/gax:Action) " />
  </Actions>
</Recipe>
